import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class Gender extends StatelessWidget {
  double width;
  double height;
  int age;
  bool isMan;

  Gender(this.width, this.height, this.age, this.isMan);

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
          borderRadius: BorderRadius.all(Radius.circular(8)),
          color: this.isMan ? Colors.blueAccent : Colors.pinkAccent),
      width: this.width,
      height: this.height,
      child: Expanded(
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceEvenly,
          children: [
            this.isMan
                ? Image.asset("images/gender_man.png")
                : Image.asset("images/gender_woman.png"),
            Text(
              "${age}",
              style: TextStyle(color: Colors.white,fontSize: 12),
            )
          ],
        ),
      ),
    );
  }
}
